[Proposal] Replace 54 individual filter plugins with a single universal plugin#1161
Draft
haimofergmail wants to merge 2 commits intoIBM:mainfrom
Draft
[Proposal] Replace 54 individual filter plugins with a single universal plugin#1161haimofergmail wants to merge 2 commits intoIBM:mainfrom
haimofergmail wants to merge 2 commits intoIBM:mainfrom
Conversation
…dividual filter plugins Introduces a new architectural pattern where one generic Logstash plugin (guardium_universal_filter) replaces all individual logstash-filter-*-guardium plugins. Each datasource is now a thin parser class implementing IGuardiumParser, with zero Logstash boilerplate. Key components: - GuardiumUniversalFilter: single @LogstashPlugin handling all event-loop boilerplate - IGuardiumParser: contract for datasource parsers (one method: parseRecord) - AbstractGuardiumParser: shared utilities (correctIPs, IP validation) - ParserRegistry: maps datasource name → parser instance - MySqlParser: fully migrated MySQL audit log parser - MongoDbParser: thin connector to existing MongoDB parser hierarchy - SnowflakeParser: thin connector to existing Snowflake parser hierarchy - ARCHITECTURE.md: design rationale and old-vs-new diagrams Adding a new datasource now requires one class + one line in ParserRegistry instead of a full plugin scaffold (~500 lines → ~100 lines per datasource). Signed-off-by: haimofergmail <haimofer@gmail.com>
Clarifies this is a suggestion for discussion, not a finished implementation. Adds questions for the team and a clear migration strategy. Signed-off-by: haimofergmail <haimofer@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The suggestion
Every filter plugin in this repo is ~95% identical boilerplate. The only unique part
is the 50–150 lines of parsing logic per datasource. That boilerplate is copy-pasted
54 times, which means:
What the proposal looks like
Before (54 plugins, each with its own gem):
After (one plugin, datasource selected via config):
Adding a new datasource would go from ~500 lines + new gem → ~100 lines, no new gem.
What's in this PR
logstash-filter-guardium-universal/— a working reference implementationARCHITECTURE.md— full design rationale, old-vs-new diagrams, migration strategy, and open questions for the teamOpen questions for the team
IGuardiumParserlive incommonto allow independent parser JARs?Happy to iterate on the design or answer any questions. Thanks for your time!
— @haimofergmail